@extends('admin.layout.layout', ['row' => @$page])

@section('contain')

    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <x-portlet-breadcrumb :page="$page"></x-portlet-breadcrumb>
            </div>
            <div class="actions">
                @if (!empty($menus) && in_array('add', $menus))
                <div class="items">
                    <a href="/{{ request()->path() }}/create" class="btn btn-primary">{{ ts('addnew') }}</a>
                </div>
                @endif
            </div>
        </div>

        <div class="filter-wrapper mb-3">
            <form action="/{{ request()->path() }}/"  class="form-inline filter-form">
                <div class=" input-group custom-control-inline  mb-3 ">
                    <input type="text" class="form-control s-input" name="value" value="{{ request()->input('value') }}" placeholder="{{ ts('SMST1') }}">
                </div>

                {{--<x-p-t-select></x-p-t-select>--}}

                <div class=" mb-3 ">
                    <button class="btn btn-primary">{{ ts('SEARCH') }}</button>
                    <a href="/{{ request()->path() }}/" class="btn btn-warning">{{ ts('RESET') }}</a>
                </div>

            </form>
        </div>

        <div>

            <table class="table table-s2 text-center">
                <thead>
                <tr>
                    <th>{{ ts('sequence') }}</th>
                    {{--<th>{{ ts('PRODUCTTYPE') }}</th>--}}
                    {{--<th>{{ ts('part') }}</th>--}}
                    <th>{{ ts('ENGLISH') }}</th>
                    <th>{{ ts('CHINESET') }}</th>
                    <th>{{ ts('CHINESES') }}</th>
                    <th>{{ ts('ylcd2') }}</th>
                    <th>{{ ts('OPTION') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $k => $v)
                    <tr class="item-list">

                        <td>{{ @$data->firstItem()+$k }}</td>
                        {{--<td>
                            {{ ts('product_types.'.@$v->product_type_id) }}
                        </td>--}}
                        {{--<td>
                            {{ @$v->id }}
                        </td>--}}
                        <td>
                            {{ @$v->english_value }}
                        </td>
                        <td>
                            {{ @$v->traditional_chiness_value }}
                        </td>
                        <td>
                            {{ @$v->simplified_chiness_value }}
                        </td>
                        <td>
                            {{ @$v->min_length }} cm
                        </td>
                        <td>
                            @if (!empty($menus) && in_array('edit', $menus))
                            <a class="btn btn-warning btn-sm" href='/{{ request()->path() }}/{{ $v->id }}/edit'>{{ ts('EDIT') }}</a>
                            @endif
                            @if (!empty($menus) && in_array('delete', $menus))
                            <span class="btn btn-danger btn-sm" onclick="handleDelete3('{{ $v->id }}', '膜的种类 {{ @$v->simplified_chiness_value }}')">{{ ts('delete') }}</span>
                            @endif
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div class="my-3">
                {{ $data->appends(request()->input())->links() }}
            </div>
        </div>


    </div>


@endsection

@section('script')
    <script>
        $(document).ready(function () {
            $('.table.bt-table').bootstrapTable({}).removeClass('d-none')
        })
    </script>
@endsection